/* 
readonly 修饰符   定义和构造器中赋值, 其它地方不能赋值
*/
(() => {
  class Person {
    readonly name: string = 'abc'
    constructor(name: string) {
      this.name = name
    }
  }
  
  let john = new Person('John')
  // john.name = 'xxx'
  
})() 